FROM eclipse-temurin:17-jdk-alpine
ARG appJar
ARG workspace=/workspace
COPY build/libs/$appJar $workspace/app.jar
COPY build/resources/main $workspace/
COPY fonts/* $workspace/fonts/
#ENV LD_LIBRARY_PATH=$workspace/libs
RUN sh -c "mkdir -p \$JAVA_HOME/lib/fonts "
RUN sh -c "cp $workspace/fonts/* \$JAVA_HOME/lib/fonts/"
RUN chmod 777 -R $workspace
WORKDIR $workspace
ENTRYPOINT ["sh", "-c", "java ${JAVA_TOOL_OPTIONS} -jar app.jar"]